<!{include file=header.html}
        <script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/common.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=DatePicker/WdatePicker.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=ajaxfileupload.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/jquery.funkyUI.js}"></script>
        <script language="JavaScript" type="text/javascript" src="{res file=js/lan.js}"></script>
        <script language="JavaScript" type="text/javascript" src="{res file=js/order_packlist.js}"></script>
        <link href="template/style/css/style.css" type="text/css" rel="stylesheet" />
        <style>
            label.error {color:red;}
			table,th,td{border:1px solid #000;}
        </style>
<script type="text/javascript">
function pagePrint(this_obj)
{
	$(this_obj).parents("tr").hide();
	window.print() ;
	$(this_obj).parents("tr").show();
}
</script>
<body>
  <div class="sub-body" style="width: 900px">

	  <div class="tab_info">
		  <div class="tab-title-1"><span>客人订单数量：</span></div>
		  <table class="" width="900">
			  <th class="" colspan="1">颜色/数量：</th>
			  <td colspan="7" style="padding:0; margin:0;">
				  <table cellpadding="0" cellspacing="0" class="fabric_info_table center_txt" width="100%">
					  <th width="8%">颜色</th>
					  <th width="8%">颜色描述</th>
					  <th width="8%">色号</th>
					  <th width="8%">包装配比</th>
					  <th width="8%" cqindex="1">
						  {$curr_cq_sizename.v1_name}</th>
					  <th width="8%" cqindex="2">{$curr_cq_sizename.v2_name}</th>
					  <th width="8%" cqindex="3">{$curr_cq_sizename.v3_name}</th>
					  <th width="8%" cqindex="4">{$curr_cq_sizename.v4_name}</th>
					  <th width="8%" cqindex="5">{$curr_cq_sizename.v5_name}</th>
					  <th width="8%" cqindex="6">{$curr_cq_sizename.v6_name}</th>
					  <th width="8%" class="no_right_border">合计</th>

					  <!--{foreach from=$cq_info item=c name=n}-->
					  <tr>
						  <td>{$c.color}</td>
						  <td>{$c.color_desc}</td>
						  <td>{$c.color_num}</td>
						  <td>{$c.proportion}</td>
						  <td>{$c.v6}</td>
						  <td>{$c.v8}</td>
						  <td>{$c.v10}</td>
						  <td>{$c.v12}</td>
						  <td>{$c.v14}</td>
						  <td>{$c.v16}</td>
						  <td class="no_right_border">{$c.total}</td>
					  </tr>
					  <!--{/foreach}-->
				  </table>
			  </td>
			  </tr>

		  </table>

	  </div>



	  <!--<div class="tab_info">-->
		  <!--<input type="hidden" name="ssId" id="ssId" value="}"  />-->
		  <!--<div class="tab-title-1"><span>实际出货数量</span></div>-->
		  <!--<table class="" width="900">-->
			  <!--<th class="" colspan="1">颜色/数量：</th>-->
			  <!--<td colspan="7" style="padding:0; margin:0;">-->
				  <!--<table cellpadding="0" cellspacing="0" class="fabric_info_table center_txt" width="100%">-->
					  <!--<th width="8%">颜色</th>-->
					  <!--<th width="8%">颜色描述</th>-->
					  <!--<th width="8%">色号</th>-->
					  <!--<th width="8%">包装配比</th>-->
					  <!--<th width="5%" cqindex="1">-->
						  <!--{$curr_cq_sizename.v1_name}</th>-->
					  <!--<th width="5%" cqindex="2">{$curr_cq_sizename.v2_name}</th>-->
					  <!--<th width="5%" cqindex="3">{$curr_cq_sizename.v3_name}</th>-->
					  <!--<th width="5%" cqindex="4">{$curr_cq_sizename.v4_name}</th>-->
					  <!--<th width="5%" cqindex="5">{$curr_cq_sizename.v5_name}</th>-->
					  <!--<th width="5%" cqindex="6">{$curr_cq_sizename.v6_name}</th>-->

					  <!--<th width="8%" class="no_right_border">合计</th>-->
					  <!--<th width="8%" cqindex="6">箱数</th>-->
					  <!--<th width="200" style="word-wrap:break-word;word-break:break-all;" cqindex="6">箱号</th>-->

					  <!--&lt;!&ndash;{foreach from=$cq_info_reality item=c name=n}&ndash;&gt;-->
					  <!--<tr>-->
						  <!--<td>{$c.color}</td>-->
						  <!--<td>{$c.color_desc}</td>-->
						  <!--<td>{$c.color_num}</td>-->
						  <!--<td>{$c.proportion}</td>-->
						  <!--<td>{$c.v6}</td>-->
						  <!--<td>{$c.v8}</td>-->
						  <!--<td>{$c.v10}</td>-->
						  <!--<td>{$c.v12}</td>-->
						  <!--<td>{$c.v14}</td>-->
						  <!--<td>{$c.v16}</td>-->
						  <!--<td class="">{$c.total}</td>-->
						  <!--&lt;!&ndash;no_right_border&ndash;&gt;-->
						  <!--<td>{$c.carton_num}</td>-->
						  <!--<td style="word-wrap:break-word;word-break:break-all;" width="">{$c.carton_no}</td>-->
					  <!--</tr>-->
					  <!--&lt;!&ndash;{/foreach}&ndash;&gt;-->
				  <!--</table>-->
			  <!--</td>-->
			  <!--</tr>-->

		  <!--</table>-->

	  <!--</div>-->




	  <div class="tab_info">
		  <input type="hidden" name="ssId" id="sssad" value="{$ss_id}"  />
		  <div class="tab-title-1"><span>实际出货数量</span></div>
		  <table class="" width="900">
			  <th class="" colspan="1">颜色/数量：</th>
			  <td colspan="7" style="padding:0; margin:0;">
				  <table cellpadding="0" cellspacing="0" class="fabric_info_table center_txt" width="100%">
					  <th width="8%">颜色</th>
					  <!--<th width="8%">颜色描述</th>-->
					  <!--<th width="8%">色号</th>-->
					  <!--<th width="8%">包装配比</th>-->
					  <th width="5%" cqindex="1">
						  {$curr_cq_sizename.v1_name}</th>
					  <th width="5%" cqindex="2">{$curr_cq_sizename.v2_name}</th>
					  <th width="5%" cqindex="3">{$curr_cq_sizename.v3_name}</th>
					  <th width="5%" cqindex="4">{$curr_cq_sizename.v4_name}</th>
					  <th width="5%" cqindex="5">{$curr_cq_sizename.v5_name}</th>
					  <th width="5%" cqindex="6">{$curr_cq_sizename.v6_name}</th>

					  <th width="8%" class="no_right_border">合计</th>
					  <th width="8%" cqindex="6">箱数</th>
					  <th width="200" style="word-wrap:break-word;word-break:break-all;" cqindex="6">箱号</th>

					  <!--{foreach from=$pask_lists item=c}-->
					  <tr>
						  <td>{$c.color}</td>
						  <!--<td>{$c.color_desc}</td>-->
						  <!--<td>{$c.color_num}</td>-->
						  <!--<td>{$c.proportion}</td>-->
						  <td>{$c.size_v1}</td>
						  <td>{$c.size_v2}</td>
						  <td>{$c.size_v3}</td>
						  <td>{$c.size_v4}</td>
						  <td>{$c.size_v5}</td>
						  <td>{$c.size_v6}</td>
						  <td class="">{$c.total}</td>
						  <!--no_right_border-->
						  <td>{$c.carton_num}</td>
						  <td style="word-wrap:break-word;word-break:break-all;" width="">{$c.carton_no}</td>
					  </tr>
					  <!--{/foreach}-->
				  </table>
			  </td>
			  </tr>

		  </table>

	  </div>



    <div class="tab_info">
		<div class="tab-title-1"><span>装箱单</span></div>
          <form action="" method="post" name="packlist_form" id="packlist_form">
          <input type="hidden" name="pid" id="pid"  />
			  <input type="hidden" name="ss_id" id="ss_id" value="{$ss_id}"  />

			  <table width="900" border="1" cellspacing="0" cellpadding="0" class="tab-display" id="tab-color2">
          <tr>
            <th colspan="14" height="30" align="center"><h3>品牌:{$order.brand_name}&nbsp;&nbsp;({$order.company_name})&nbsp;&nbsp;订单号:{$order.order_sn}&nbsp;&nbsp;款号:{$order.style_sn}&nbsp;&nbsp;装箱单信息</h3></th>
          </tr>
          <!-- {if $user.role eq USER_CHUANWU} -->
          <tr>
          	<th colspan="13" height="30" align="left">&nbsp;
	          	工厂入仓日期：<input type="text" class="input-1" name="release_date" id="release_date" value="{$order.release_date|date}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>&nbsp;&nbsp;&nbsp;&nbsp;
	          	客户入仓日期：<input type="text" class="input-1" name="buyer_arrival_date" id="buyer_arrival_date" value="{$order.buyer_arrival_date|date}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
          	</th>
          </tr>
          <!-- {/if} -->
	      <tr>
		      <th rowspan="2">箱号</th>
			  <th rowspan="2">尾箱</th>
			  <th rowspan="2">颜色</th>
		      <th colspan="6">尺码</th>
		      <th rowspan="2">每箱数量</th><th  rowspan="2">箱数</th><th  rowspan="2">累计件数</th><th  rowspan="2">毛重</th>
		      <th rowspan="2">操作</th>
	      </tr>
       <tr>
		   <!--<th></th><th></th><th></th>-->
 		<th>{$curr_cq_sizename.v1_name}</th><th>{$curr_cq_sizename.v2_name}</th>
      	<th>{$curr_cq_sizename.v3_name}</th>
      	<th>{$curr_cq_sizename.v4_name}</th><th>{$curr_cq_sizename.v5_name}</th><th>{$curr_cq_sizename.v6_name}</th>
      </tr>
      
	    {if $order.pack_status eq ORDER_PACK_STATUS_NO AND $user.role eq USER_FACTORY}
	    <tr class="add_row">
	    <td>
	     <input type="hidden" name="pid[]" value="" />
	     <input type="hidden" name="order_id" id="order_id" value="{$order.order_id}" />
	    <input size="5" type="text" name="box_num[]" />
	    </td>
			<td>
				<select name="last_box[]">
					<option>否</option>
					<option value="1">是</option>

				</select>
			</td>
	    <td>
		    <select name="color[]">
		    <option></option>
		    {foreach from=$color_list item=color}
		    <!--<option value="{$color.color}|{$color.cq_id}">{$color.color}</option>-->
		    <option value="{$color.color}">{$color.color}</option>
		    {/foreach}
		    </select>
	    </td>
	    <td><input size="3" type="text" name="size_v1[]" /></td>
	    <td><input size="3" type="text" name="size_v2[]" /></td>
	    <td><input size="3" type="text" name="size_v3[]"  /></td>
	    <td><input size="3" type="text" name="size_v4[]" /></td>
	    <td><input size="3" type="text" name="size_v5[]" /></td>
	    <td><input size="3" type="text" name="size_v6[]" /></td>
		<td><input size="5" type="text" name="amount_per_box[]" /></td>
	    <td><input size="5" type="text" name="box_cnt[]" /></td>
	    <td><input size="5" type="text" name="total_cnt[]" /></td>
	    <td><input size="5" type="text" name="gross_weight[]" /></td>
	    <td><input size="5"  type="button" name="op[]" value="添加"  /></td>  
	    </tr>
	    {/if}
	   {foreach from=$pask_list item=pack}
	    <tr class="edit_row">
	    {if $order.pack_status eq ORDER_PACK_STATUS_NO}
	    <td>
	     <input type="hidden" name="pid[]" value="{$pack.pid}" />
	    <input size="5" type="text" name="box_num[]" value="{$pack.box_num}" />
	    </td>
			<td>

				<select name="last_box[]">
					<option>否</option>
				<option {if $pack.last_box eq 1} selected="selected"{/if} value="1">是</option>

				</select>

			</td>
	    <td>
		    <select name="color[]">
		    <option></option>
		    {foreach from=$color_list item=color}
		    <option {if $color.color eq $pack.color} selected="selected"{/if} value="{$color.color}">{$color.color}</option>
		    <!--<option {if $color.color eq $pack.color} selected="selected"{/if} value="{$color.color}|{$color.cq_id}">{$color.color}</option>-->
		    {/foreach}
		    </select>
	    </td>
	    <td> <input size="3" type="text" name="size_v1[]" value="{$pack.size_v1}" /> </td>
	    <td><input size="3" type="text" name="size_v2[]" value="{$pack.size_v2}" /></td>
	    <td><input size="3" type="text" name="size_v3[]" value="{$pack.size_v3}"  /></td>	
	    <td><input size="3" type="text" name="size_v4[]" value="{$pack.size_v4}" /></td>
	    <td><input size="3" type="text" name="size_v5[]" value="{$pack.size_v5}"  /></td>
	    <td><input size="3" type="text" name="size_v6[]" value="{$pack.size_v6}"  /></td>
		<td><input size="5" type="text" name="amount_per_box[]" value="{$pack.amount_per_box}"  /></td>
	    <td><input size="5" type="text" name="box_cnt[]" value="{$pack.box_cnt}"  /></td>
	    <td><input size="5" type="text" name="total_cnt[]" value="{$pack.total_cnt}"  /></td>
	    <td><input size="5" type="text" name="gross_weight[]" value="{$pack.gross_weight}"  /></td>
	    <td><input size="5"  type="button" name="op[]" value="移除"  /></td>
	    {else}
	     <td>
	     <input type="hidden" name="pid[]" value="{$pack.pid}" />
	    {$pack.box_num}
	    </td>
			<td>
				{if $pack.last_box eq 1}是 {else}否{/if}
			</td>
	    <td>{$pack.color}</td>
	    <td>{$pack.size_v1} </td>
	    <td>{$pack.size_v2}</td>
	    <td>{$pack.size_v3}</td>	
	    <td>{$pack.size_v4}</td>
	    <td>{$pack.size_v5}</td>
	    <td>{$pack.size_v6}</td>
		<td>{$pack.amount_per_box}</td>
	    <td>{$pack.box_cnt}</td>
	    <td>{$pack.total_cnt}</td>
	    <td>{$pack.gross_weight}</td>
	    <td>&nbsp;</td>
	    {/if}
      </tr>
      {/foreach}  
	<tr>
		<td colspan="4">&nbsp;</td>
	    <th>总箱数</th>
	    <td colspan="2"><span id="box_cnt_sum">{$countBox}
			<!--pask_sum_info.box_cnt_sum|default:0-->
		</span>箱</td>
	    <th>总件数</th>
	    <td colspan="2"><span id="total_cnt_sum">{$pask_sum_info.total_cnt_sum|default:0}</span>件</td>
	    <th>毛重总计</th>
	    <td colspan="3"><span id="gross_weight_sum">{$pask_sum_info.gross_weight_sum|default:0}</span>公斤</td>
	</tr>
    <tr>
	    <td colspan="14">
	    {if $user.role eq USER_FACTORY AND $order.factory_id eq $user.factory_id AND $order.pack_status eq ORDER_PACK_STATUS_NO}
	    <input onClick="if(confirm('确认保存资料吗?')!=true){return false;}" type="submit" name="submit" value="保存资料" class="btn-2" /> &nbsp;&nbsp;
	    <input onClick="if(confirm('确认提交船务吗?')!=true){return false;}" type="submit" name="submit" value="提交船务" class="btn-2" />
	    {/if}
	    {if $user.role eq USER_CHUANWU AND $order.pack_status eq ORDER_PACK_STATUS_SUBMIT_CHUANWU}
	    &nbsp;&nbsp;<input onClick="if(confirm('确认此装箱单吗?')!=true){return false;}" type="submit" name="submit" value="船务确认" class="btn-2" />
	    {/if}
	    {if $user.role eq USER_CHUANWU AND $order.pack_status neq ORDER_PACK_STATUS_NO}
	    &nbsp;&nbsp;<input onClick="if(confirm('确认重置此装箱单吗?')!=true){return false;}" type="submit" name="submit" value="重置" class="btn-2" />
	    {/if}  
	    
	     &nbsp;&nbsp;<input onClick="if(confirm('确认打印此装箱单吗?')==true){pagePrint(this);}" type="button"  value="打印" class="btn-2" />
	     &nbsp;&nbsp;<input type="button" class="btn-2" value="返回" onclick="history.back();" />
	    </td>
    </tr>
	</table>
   </form>
</div>
</div>
<div id="remsg"></div>
<script language="JavaScript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</body>
</html>